const mongoose = require('mongoose');
const { Schema, model } = mongoose;

const limitUpSchema = new Schema(
    {
        date: {
            type: Date,
            default: Date.now
        },
        code: String,
        name: String,
        sector: String,
        region: String,
        limitUpPrice: String,
        changePercent: String,
        changePrice: String,
        totalHands: String,
        transactionVolume: String,
        currentHand: String,
        pe: String,
        turnoverRate: String,
        limitUpTime: String,
        downTime: String,
    },
    {
        _id: { type: String, index: true }
    }
);

const LimitUp = model('LimitUp', limitUpSchema, 'limitUp');
module.exports = LimitUp;
